package day_2023_7_to_10;

/**
 * @author haomin
 * @date 2023/07/30 23:17
 **/
public class Day_7_30 {
    class Solution {
        public int minArray(int[] numbers) {
            int l = 0, r = numbers.length-1, mid;
            while(l < r) {
                mid = l + ((r-l)>>1);
                if(numbers[mid] < numbers[r]) r = mid;
                else if(numbers[mid] > numbers[r]) l = mid + 1;
                else r--;
            }
            return numbers[l];
        }
    }
}